/**
 * 
 */
package ar.com.greensoft.neosystem.dao.jpa;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Root;

import ar.com.greensoft.neosystem.dao.AuthorityDao;
import ar.com.greensoft.neosystem.model.Authority;
import ar.com.greensoft.neosystem.model.AuthorityId;
import ar.com.greensoft.neosystem.model.User;
import ar.com.greensoft.neosystem.search.SearchFilter;

/**
 * 
 * @author Jorge E. Villaverde
 * @since 20/02/2013
 * @version 1.0.0
 */
@Stateless
public class JpaAuthorityDaoImpl 
	extends AbstractJpaDaoImpl<Authority, AuthorityId>
 	implements AuthorityDao{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public List<Authority> findByUser(User user) {
		if(user == null)
			throw new IllegalArgumentException("User is null");
		return null;
	}

	@Override
	protected Class<Authority> getEntityClazz() {
		return Authority.class;
	}

	@Override
	protected Expression<Boolean> createWhereFromSearchFilter(
			SearchFilter searchFilter, Root<Authority> root) {
		return null;
	}

	@Override
	protected String getFindByNameNamedQuery() {
		return Authority.FIND_BY_NAME_QUERY_NAME;
	}
}
